-
Notifications
You must be signed in to change notification settings - Fork 15.4k
lldbgdbremote.md: Update qWasmLocal result description
#170393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The current description mistakenly specified that an address of the local value in some address space is returned. When testing this with Wasm runtimes that already implement this command, it can be clearly seen that the value is returned. The value itself may be an address for languages that use shadow stack in Wasm linear memory, but the value of an arbitrary local does not always contain that address.
|
@llvm/pr-subscribers-lldb Author: Max Desiatov (MaxDesiatov) ChangesThe current description mistakenly specified that an address of the local value in some address space is returned. When testing this with Wasm runtimes that already implement this command, it can be clearly seen that the value is returned. The value itself may be an address for languages that use shadow stack in Wasm linear memory, but the value of an arbitrary local does not always contain that address. Full diff: https://github.com/llvm/llvm-project/pull/170393.diff 1 Files Affected:
diff --git a/lldb/docs/resources/lldbgdbremote.md b/lldb/docs/resources/lldbgdbremote.md
index 36b95f1073ebc..80e76fed8c78b 100644
--- a/lldb/docs/resources/lldbgdbremote.md
+++ b/lldb/docs/resources/lldbgdbremote.md
@@ -2505,7 +2505,7 @@ variables.
Get the value of a Wasm function argument or local variable for the given frame
index at the given variable index. The indexes are encoded as base 10. The
-result is a hex-encoded address from where to read the value.
+result is a hex-encoded little-endian value of the local.
```
|
JDevlieghere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it returns the value, not the address. The documentation for qWasmGlobal and qWasmStackValue is incorrect as well.
JDevlieghere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for fixing this!
This change fully implements `qWasmLocal` GDB RP host command per the LLDB extensions specification updated in llvm/llvm-project#170393.
The current description mistakenly specified that an address of a local value in some address space is returned. When testing this with Wasm runtimes that already implement this command, it can be observed that the value itself is returned. The value itself may be an address for languages that use shadow stack in Wasm linear memory, but the value of an arbitrary local does not always contain that address.
The current description mistakenly specified that an address of a local value in some address space is returned. When testing this with Wasm runtimes that already implement this command, it can be observed that the value itself is returned. The value itself may be an address for languages that use shadow stack in Wasm linear memory, but the value of an arbitrary local does not always contain that address.